package com.tanhua.dubbo.api;

import com.tanhua.model.enums.CommentType;
import com.tanhua.model.mongo.Comment;
import org.bson.types.ObjectId;

import java.util.List;

public interface CommentApi {
    /**
     * 保存评论
     */
    Integer save(Comment comment1);
    /**
     * 分页查询评论
    */
    List<Comment> findComments(String movementId, CommentType comment, Integer page, Integer pagesize);

    /**
     * 动态点赞
     * @param movementId
     * @param userId
     * @param like
     * @return
     */
     Boolean hasComment(String movementId, Long userId, CommentType like);

     Boolean hasComment(String movementId, Long userId);

    /**
     * 取消点赞
     * @param comment
     * @return
     */
    Integer delete(Comment comment);

    Comment findById(ObjectId id);



    Integer commmentsLike(Comment comment);

    Integer commmentsDislike(Comment comment);
    //列表查询
    List<Comment> findlist(Integer page, Integer pagesize, Long userId,Integer type);
}
